import request from '@/utils/request'
// 当前甲方的信息
export function getcurrentinfo(query) {
    return request({
        url:'mobile/wxDept/detail/byAppId',
        method: 'get',
        params: query
    })
}
// 轮播图 
export function bannerList(query) {
    return request({
        url: 'mobile/shopBanner/list' ,
        method: 'get',
        params: query
    })
}
// 获取一级分类
export function getcalistone(query) {
  return request({
      url: 'mobile/sc/categoryAllList' ,
      // url: 'mobile/sc/oneList' ,
      method: 'get',
      params: query
  })
}
// 获取二级分类
export function getcalisttwo(query) {
  return request({
      url: 'mobile/sc/categoryAllList' ,
      // url: 'mobile/sc/twoList' ,
      method: 'get',
      params: query
  })
}
// 获取三级分类
export function getcalistthree(query) {
  return request({
      url: 'mobile/sc/categoryAllList' ,
      method: 'get',
      params: query
  })
}
// 获取一级分类
export function getcalistone1(query) {
  return request({
      url: 'mobile/sc/oneList' ,
      method: 'get',
      params: query
  })
}
// 获取二级分类
export function getcalisttwo1(query) {
  return request({
      url: 'mobile/sc/twoList' ,
      method: 'get',
      params: query
  })
}
// 获取三级分类
export function getcalistthree1(query) {
  return request({
      url: 'mobile/sc/threeList' ,
      method: 'get',
      params: query
  })
}
// 获取秒杀列表
export function getmiaoshalist(query) {
  return request({
      url: 'mobile/goodsSpu/homeList' ,
      method: 'post',
      data: query
  })
}
// 获取商品列表
export function getgoodslist(query) {
  return request({
      url: 'mobile/goodsSpu/list' ,
      method: 'post',
      data: query
  })
}
// 获取商品详情
export function getgoodsdetail(query) {
  return request({
      url: 'mobile/goodsSpu/detail' ,
      method: 'post',
      data: query
  })
}
// 获取优惠劵列表
export function getcouponslist(query) {
  return request({
      url: '/mobile/coupons/commonAllDeptList' ,
      method: 'get',
      params: query
  })
}
// 领取优惠劵
export function receiveCounpons(query) {
  return request({
      url:'mobile/coupons/receive',
      method: 'post',
      data: query
  })
}
// 获取订单数量
export function getOrderCount(query) {
  return request({
      url: 'mobile/ordOrder/statistics' ,
      method: 'get',
      params: query
  })
}
// 加入购物车 
export function addcartlist(query) {
  return request({
      url: 'mobile/shoppingCar/add' ,
      method: 'post',
      data: query
  })
}
// 购物车列表 /mobile/shoppingCar/select?customerId=356
export function getcartlist(query) {
  return request({
      url: 'mobile/shoppingCar/select' ,
      method: 'get',
      params: query
  })
}
// setHotsearch 搜索热词
export function setHotsearch(query) {
  return request({
      url:'/api/hot/search/record',
      method: 'post',
      params: query
  })
}
// getHotsearch 搜索热词
export function getHotsearch(query) {
  return request({
      url:'/api/hot/search/rank',
      method: 'get',
      params: query
  })
}
// getnowbuyinfo,
export function getnowbuyinfo(query) {
  return request({
      url:'mobile/ordOrder/settlementList',
      method: 'post',
      data: query
  }) 
}
// getcartinfo
export function getcartinfo(query) {
  return request({
      url:'mobile/shoppingCar/confirm',
      method: 'post',
      data: query
  }) 
}
// 购物车增减
export function setcartnum(query) {
  return request({
      url:'mobile/shoppingCar/edit',
      method: 'post',
      data: query
  })  
}
// 购物车删除
export function delcartnum(query) {
  return request({
      url:'mobile/shoppingCar/delete',
      method: 'get',
      params: query
  })
}
// 全部优惠劵列表
 export function getallc(query) {
  return request({
      url:'mobile/coupons/commonList',
      method: 'get',
      params: query
  })
}
// 获取我的优惠劵列表
export function getmyc(query) {
  return request({
      url:'mobile/coupons/myList',
      method: 'get',
      params: query
  })
 
}
// 使用优惠劵 
export function useCounpons(query) {
  return request({
      url:'mobile/coupons/useCounpons',
      method: 'get',
      params: query
  })
}

// 购物车生成订单
export function addOrderbycart(query) {
  return request({
      url:'mobile/ordOrder/addShoppingOrderByWy',
      method: 'post',
      data: query
  }) 
}
// 直接购买生成订单
export function addOrderbybuyNow(query) {
  return request({
      url:'mobile/ordOrder/addOrder',
      method: 'post',
      data: query
  })
 
}
// getdeptInfo 获取部门信息
export function getdeptInfo(query) {
  return request({
      url:'/mobile/wxDept/byDeptId',
      method: 'get',
      params: query
  })
}